<meta charset="utf8" />
<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Administrator
 * Date: 12-7-15
 * Time: 上午10:41
 * To change this template use File | Settings | File Templates.
 */
include("conn.php");
$sql = sprintf("select * from `news`");
$query = mysql_query($sql);
?>
<p><a href="add.php">添加内容</a></p>
<?php while ($rs = mysql_fetch_assoc($query)) { ?>
<h1>标题：<?php echo $rs["title"] ?></h1>
<p>发表时间：<?php echo $rs["dates"] ?></p>
<div class="content">
    <?php echo $rs["content"] ?>
</div>
<p><a href="edit.php?id=<?php echo $rs["id"]?>">编辑</a> | <a href="del.php?id=<?php echo $rs["id"]?>">删除</a></p>
<?php } ?>